package util;

public class HtmlParagraph {
    public static String firstSentence(String s) {
        int i = 0;
        int start = 0;
        while (i < s.length()) {
            if (s.charAt(i) == '>') {
                start = i + 1;
            } else if (s.charAt(i) == '.' || s.charAt(i) == '!' || s.charAt(i) == '?' || s.charAt(i + 1) == '<') {
                return s.substring(start, i + 1);
            }
            i++;
        }
        return s;
    }
}
